package com.pmrt.report.items;

public class Problem implements Recordable{
	
	/**
	 * The title of the Problem
	 */
	private String title;
	
	/**
	 * The description of the Problem
	 */
	private String description;
	
	/**
	 * If the problem is resolved
	 */
	private boolean resolved;
	
	/**
	 * Username of who submitted the Problem
	 */
	private String username;
	
	/**
	 * The date the Problem was submitted
	 */
	private String dateSubmitted;
	
	

	public Problem(String title, String description, boolean resolved, String username, String dateSubmitted) {
		super();
		this.title = title;
		this.description = description;
		this.resolved = resolved;
		this.username = username;
		this.dateSubmitted = dateSubmitted;
	}
	
	
	public String getTitle() {
		return title;
	}



	public void setTitle(String title) {
		this.title = title;
	}



	public String getDescription() {
		return description;
	}



	public void setDescription(String description) {
		this.description = description;
	}



	public boolean isResolved() {
		return resolved;
	}



	public void setResolved(boolean resolved) {
		this.resolved = resolved;
	}



	public String getUsername() {
		return username;
	}



	public void setUsername(String username) {
		this.username = username;
	}



	public String getDateSubmitted() {
		return dateSubmitted;
	}



	public void setDateSubmitted(String dateSubmitted) {
		this.dateSubmitted = dateSubmitted;
	}



	@Override
	public String getXMLData() {
		String xml = "  <problem title=\""+title+"\">\r\n";
		xml += "    <description>"+description+"</description>\r\n";
		xml += "    <username>"+username+"</username>\r\n";
		xml += "    <resolved>"+resolved+"</resolved>\r\n";
		xml += "    <date>"+dateSubmitted+"</date>\r\n";
		xml += "  </problem>";
		return null;
	}
}